package com.example.javafx.矩形椭圆;

import javafx.application.Application;
import javafx.scene.Group;
import javafx.scene.Scene;
import javafx.scene.paint.Color;
import javafx.scene.shape.Rectangle;
import javafx.stage.Stage;

/**
 * 圆角矩形
 */
public class Main_1 extends Application {
    @Override
    public void start(Stage primaryStage) throws Exception {

        primaryStage.setTitle("圆角矩形示例");
        Group group = new Group();
        Rectangle rect = new Rectangle(20,20,200,200);
        rect.setArcHeight(15);
        rect.setArcWidth(15);
        rect.setStroke(Color.BLACK);
        group.getChildren().add(rect);
        Scene scene = new Scene(group,300,200);
        primaryStage.setScene(scene);
        primaryStage.show();
    }

    public static void main(String[] args) {
        launch(args);
    }
}
